using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using THSLib;using THSERP.BaseProvider;

namespace THSERP.Modules.Report
{
    public partial class RP017 : ReportForm
    {
        public RP017()
        {
            InitializeComponent();
        }

        private void fld_btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void fld_btnApply_Click(object sender, EventArgs e)
        {
            StringBuilder queryBuilder = new StringBuilder();
            queryBuilder.Append(GenerateSearchQuery(THSUtil.GetTableNameFromBusinessObjectType(typeof(APReturnSuppliersInfo))));
            DataSet ds = new APReturnSuppliersController().GetDataSet(queryBuilder.ToString());
            fld_dgcAPRP017ReturnSuppliers.DataSource = ds.Tables[0];
            fld_dgcAPRP017ReturnSuppliers.RefreshDataSource();
        }

        private void RP017_Load(object sender, EventArgs e)
        {
            fld_lkeFK_APSupplierID.Screen = this;
            fld_lkeFK_APSupplierID.InitializeControl();
            fld_dgcAPRP017ReturnSuppliers.Screen = this;
            fld_dgcAPRP017ReturnSuppliers.InitializeControl();

            fld_btnApply_Click(new object(), new EventArgs());
        }
    }
}